Tool Predicate Options
data class ToolPredicateOptions<TContext>(val toolCallId: String, val messages: List<ModelMessage>, val experimental_context: TContext? = null)
Options bag passed to predicate callbacks (Tool.needsApproval, Tool.toModelOutput). Mirrors v6's {toolCallId, messages, experimental_context} argument shape (per historical parity gap #17). Lets a predicate decide based on the conversation history or the current call's identity, not just the input.
Distinct from ToolExecutionContext — predicate options are READ-ONLY metadata about the call, no abort signal because predicates run synchronously before / after the executor.
Constructors
Link copied to clipboard
constructor(toolCallId: String, messages: List<ModelMessage>, experimental_context: TContext? = null)